<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/common/taglib.jsp" %>

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta content="微社区,Q生活" name="keywords"/>
<meta content="微社区,Q生活" name="description"/>
<title>微社区|Q生活</title>
<link rel="stylesheet" href="${ctx }/static/css/Master.css"/>
<link rel="stylesheet" href="${ctx }/static/css/lq.datetimepick.css"/>

<script src="${ctx }/static/js/jquery-1.9.0.min.js"></script>
<script src="${ctx }/static/js/simpletooltip.min.js"></script>
<script src="${ctx }/static/js/selectUi.js"></script>
<script src="${ctx}/static/plugins/My97DatePicker/WdatePicker.js"></script>

<script src="${ctx}/static/plugins/layer/layer.js"></script>
<%-- 基础js,所有页面都需要引入此js,依赖layer.js --%>
<script src="${ctx}/static/js/common/base.js"></script>
<script src="${ctx}/static/js/common/util.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	LQ.selectUi.show({id:"logResult"});
	LQ.selectUi.show({id:"logType"});
});
</script>
</head>

<body class="utilSubmit">
<section class="boxRight">
<form id="searchForm" method="get" >
<div class="context boxborder">

	<!-- 查询 -->
	<div class="SearchList">
		<ul class="clearfix">
			
			<li><span class="name">模块：</span><span class="pt"><input type="text" id="logModule" name="logModule" value="${result.entity.logModule }"/></span></li>
			<li><span class="name">操作：</span><span class="pt"><input type="text" id="logOperation" name="logOperation" value="${result.entity.logOperation }"/></span></li>
			<li><span class="name">用户：</span><span class="pt"><input type="text" id="insertName" name="insertName" value="${result.entity.insertName }"/></span></li>
			<li><span class="name">时间：</span><span class="date"><input type="text" placeholder="开始时间" id="dateStart" name="dateStart" value="${result.entity.dateStart }" onclick="WdatePicker({maxDate:'#F{$dp.$D(\'dateEnd\')}'})"/></span>
				<span class="fg">~</span><span class="date"><input type="text" placeholder="结束时间" id="dateEnd" name="dateEnd" value="${result.entity.dateEnd }" onclick="WdatePicker({minDate:'#F{$dp.$D(\'dateStart\')}'})"/></span></li>
			<br>
			<%--<li><span class="name">编号：</span><span class="pt"><input type="text" class="utilInteger" id="logId" name="logId" value="${result.entity.logId }"/></span></li>--%>
			<li><span class="name">分组：</span><span class="pt"><input type="text" class="utilInteger" id="logGroup" name="logGroup" value="${result.entity.logGroup }"/></span></li>
			<li><span class="name">I&nbsp;&nbsp;&nbsp;&thinsp;P：</span><span class="pt"><input type="text" id="logIp" name="logIp" value="${result.entity.logIp }"/></span></li>
			<li><span class="name">结果： </span>
				<div id="logResult" class="selectul" style="width: 112px;"><div class="selectfocus" data-value="${result.entity.logResult}"><em></em></div><select>
				<option value="">请选择</option>
				<c:forEach items="${diy:getDicList('OP_RESULT') }" var="dic">
				<option value="${dic.code }">${dic.content }</option>
				</c:forEach>
				</select></div>
			</li>
			<li><span class="name">类型： </span>
				<div id="logType" class="selectul" style="width: 99px;"><div class="selectfocus" data-value="${result.entity.logType}"><em></em></div><select>
				<option value="">请选择</option>
				<c:forEach items="${diy:getDicList('OP_TYPE') }" var="dic">
				<option value="${dic.code }">${dic.content }</option>
				</c:forEach>
				</select></div>
			</li>
			<li class="combtn pr"><a href="javascript:void(0);" onclick="submitPage(1,this);" class="utilSubmitBtn">查询</a><a href="javascript:void(0);" class="utilReset">重置</a> </li>
		</ul>
	</div>
	
	<!-- 内容 -->
	<div class="com_table">
		<table width="100%" cellpadding="0" cellspacing="0">
			<tr>
				<th>序号</th>
				<th>模块</th>
				<th>操作</th>
				<th>IP</th>
				<th>耗时(秒)</th>
				<th>结果</th>
				<th>类型</th>
				<th>操作人</th>
				<th>操作时间</th>
				<th>详情</th>
			</tr>
			<c:forEach items="${result.entityList}" var="log" varStatus="status">
			<tr>
				<td>${(result.currentPage-1)*result.pageSize+status.count}</td>
				<td>${log.logModule}</td>
				<td>${log.logOperation}</td>
				<td>${log.logIp}</td>
				<td style="text-align: right;"><fmt:formatNumber type="number" value="${log.logDuration/1000}" pattern="0.000"/></td>
				<td>${diy:keyToValue(log.logResult,'OP_RESULT')}</td>
				<td>${diy:keyToValue(log.logType,'OP_TYPE')}</td>
				<td>${log.insertName}</td>
				<td>
					<div class="utilTips">
						<pretty:prettyTime date="${log.logTime}"/>
                		<div class="utilTipsText" style="display: none;"><fmt:formatDate value="${log.logTime}" pattern="yyyy-MM-dd HH:mm:ss" /></div>
					</div>
				</td>
				<td>
					<shiro:hasPermission name="sys:syslog:view">
						<a class="icon micon_9" title="详情" href="${ctx}/syslog/${log.logId}/detail"></a>
					</shiro:hasPermission>
				</td>
			</tr>
			</c:forEach>
		</table>
		
		<%-- 分页 --%>
		<%@ include file="/WEB-INF/common/page.jsp"%>
		
	</div>
</div>
</form>
</section>
</body>
</html>

